package bavaria.hightech.banking;

import java.util.HashMap;
import java.util.Hashtable;
import java.util.Map;



public class BankRegistry {
	
	private static BankRegistry instance;

	private Map<String, B2B> registry = new Hashtable<String, B2B>();
	
	
	public synchronized static BankRegistry getInstanze(){
		if(instance == null)
			instance = new BankRegistry();
		
		return instance;
		
	}
	
	public void bind(String name, B2B bank){
		registry.put(name, bank);
	}
	
	public B2B lockup(String name){
		return registry.get(name);
	}
}

